(defun c:gepolylinepointscsv()
	(setq doc (vla-get-activedocument (vlax-get-acad-object)))
	(setq filename (vla-get-name doc))
	(setq filetitle (vl-filename-base filename))
	(setq csvpath (strcat "D://polyline_points.csv"))
	(setq ss (ssget "_:S" '((0 . "LWPOLYLINE"))))
	(if ss
		(progn 
			(setq pline (ssname ss 0 ))
			(setq f (open csvpath "w"))
			(setq vtx 0 )
			(while (setq pt (vlax-curve-getpointatparam pline vtx))
				(write-line (strcat (rtos (car pt) 2 2) "," (rtos (cadr pt ) 2 2)) f)
				(setq vtx(+ vtx 1 ))
			)
			(close f )
			(princ (strcat  "\n顶点坐标已成果保存至" csvpath"."))		
		)
		(princ "\n操作取消活未选择多线段")
	)
	(princ）
)
(princ "\n运行命令'gepolylinepointscsv'来获取坐标并保存")
(princ)
gepolylinepointscsv
)